from flask import Flask, Blueprint

from apps.modules.admin.views.sys.dict import dict_bp
from apps.modules.admin.views.sys.file import file_bp
from apps.modules.admin.views.sys.log import log_bp
from apps.modules.admin.views.sys.mail import mail_bp
from apps.modules.admin.views.sys.monitor import monitor_bp
from apps.modules.admin.views.sys.passport import passport_bp
from apps.modules.admin.views.sys.power import power_bp
from apps.modules.admin.views.sys.rights import right_bp
from apps.modules.admin.views.sys.role import role_bp
from apps.modules.admin.views.sys.user import user_bp
from apps.modules.admin.views.sys.dept import dept_bp
from apps.modules.admin.views.sys.themes import themes_bp
from apps.modules.admin.views.sys.options import options_bp
from apps.modules.admin.views.sys.task import task_bp
from apps.modules.admin.views.sys.plugin_manager import plugin_manager_bp

# 创建sys
sys_bp = Blueprint('sys', __name__, url_prefix='/sys')


def register_sys_bps(app: Flask):
    # 在admin_bp下注册子蓝图
    sys_bp.register_blueprint(user_bp)
    sys_bp.register_blueprint(file_bp)
    sys_bp.register_blueprint(monitor_bp)
    sys_bp.register_blueprint(log_bp)
    sys_bp.register_blueprint(power_bp)
    sys_bp.register_blueprint(role_bp)
    sys_bp.register_blueprint(dict_bp)
    sys_bp.register_blueprint(mail_bp)
    sys_bp.register_blueprint(passport_bp)
    sys_bp.register_blueprint(task_bp)
    sys_bp.register_blueprint(right_bp)
    sys_bp.register_blueprint(dept_bp)
    sys_bp.register_blueprint(themes_bp)
    sys_bp.register_blueprint(options_bp)
    sys_bp.register_blueprint(plugin_manager_bp)
